# coding:UTF-8
# ________________________
# Project_Name:pythonProject
# File_Name:Administrator
# Author:Administrator
# Date_Time:2022/4/22 15:12
# Description:
# ________________________
from selenium import webdriver
import time
from selenium.webdriver.common.by import By



def  foo1():
    """"

    """
    driver = webdriver.Chrome()
    driver.maximize_window()

    driver.get(r"https://music.163.com/#/discover/toplist?id=3778678")

    #切换到内嵌页面iframe
    #driver.switch_to.frame(参数)
    #参数有三种：iframe
    driver.switch_to.frame("g_iframe")
    driver.find_element(By.XPATH,'//span[@data-res-id="1901371647"]').click()#点击播放图标
    time.sleep(100)






    driver.quit()

if  __name__=="__main__":
    foo1()